using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Message_Consult: BusinessObjectBase
	{

		#region InnerClass
		public enum Message_ConsultFields
		{
			MessageConsultID,
			Phone,
			Content,
			Date,
			Type,
			Replied
		}
		#endregion

		#region Data Members

			int _messageConsultID;
			string _phone;
			string _content;
			DateTime? _date;
			int? _type;
			bool? _replied;

		#endregion

		#region Properties

		public int  MessageConsultID
		{
			 get { return _messageConsultID; }
			 set
			 {
				 if (_messageConsultID != value)
				 {
					_messageConsultID = value;
					 PropertyHasChanged("MessageConsultID");
				 }
			 }
		}

		public string  Phone
		{
			 get { return _phone; }
			 set
			 {
				 if (_phone != value)
				 {
					_phone = value;
					 PropertyHasChanged("Phone");
				 }
			 }
		}

		public string  Content
		{
			 get { return _content; }
			 set
			 {
				 if (_content != value)
				 {
					_content = value;
					 PropertyHasChanged("Content");
				 }
			 }
		}

		public DateTime?  Date
		{
			 get { return _date; }
			 set
			 {
				 if (_date != value)
				 {
					_date = value;
					 PropertyHasChanged("Date");
				 }
			 }
		}

		public int?  Type
		{
			 get { return _type; }
			 set
			 {
				 if (_type != value)
				 {
					_type = value;
					 PropertyHasChanged("Type");
				 }
			 }
		}

		public bool?  Replied
		{
			 get { return _replied; }
			 set
			 {
				 if (_replied != value)
				 {
					_replied = value;
					 PropertyHasChanged("Replied");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("MessageConsultID", "MessageConsultID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Phone", "Phone",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Content", "Content",200));
		}

		#endregion

	}
}
